Server side child paging is done by server script that generates the children for the parent rows on demand. Implementation of server child paging is not easy and requires a lot of work on server side!, although it is simpler to implement than server root paging.
For more information see Server paging documentation.
TreeGrid provides server side DLL/SO library that provides the most of work to support the server paging,
but it can be used only some cases, see the DLL documentation.
How server child paging works
On start TreeGrid downloads layout and root rows as usual without server paging, from Layout_Url and Data_Url.
If any row contains children, it will be handled by standard client paging, without any access to server.
If the row contains no children, but has set
Count
attribute to the count of expected children, it will download the children from server on demand.
When the row with the Count attribute is expanded and becomes visible due scroll or is collapsed and is being expanded,
TreeGrid uploads to data source
Page_Url
the row identification
(and also the sorting, filtering, grouping and search state) and downloads back all the children rows.
If the children contain their own sub-children, they can be served similarly in both ways - normally included as children or with the Count attribute and downloaded on demand.
The server script should find the child rows for the parent row and return them back to the grid.
It can use the information about the grid state or use some data prepared in the first request for the body.
The server child paging is set by Cfg attribute
ChildPaging
='3'.
Remember, all the children for one parent must be downloaded at once, there is no server paging among row children (ChildParts cannot be set to 3).
But still is available client paging in children by Cfg attribute ChildParts='2'.
The downloaded children are automatically sorted and filtered (including filter by search) according to the actual state, but not grouped or searched (select, mark, find actions).
The server script implementing server child paging is responsible for grouping feature and summary calculations.
Calculations in server child paging
If the parent row contains any function for children summaries or some fixed or higher parent row aggregates children deeply, the parent row must contain results of the aggregate functions for its children.
Including filter application, if required.
The attribute format is ColNameFuncName='result for children'. The attribute name can be changed by appropriate attribute of the aggregate function.
Static files
In the most cases the children are created and served dynamically by some server script.
But it is also possible, like in this tutorial example, to load the children from static files.
For static file it is required to set Page_Method='Get'.
In this case the data source address supports wildcards according to the row identification and sorting state: *id, *Rows.
If set Cfg attribute
RemoveCollapsed
='3', it removes the downloaded children on every collapse and downloads them again on expand.
It is useful when data requires to be renewed and regenerated often.